﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage2.master" AutoEventWireup="True" CodeBehind="WarningStared.aspx.cs" Inherits="EarlyWarning_WarningStared" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="tabnav">
        <ul>
             <li ><a href="WarningSetup.aspx">药品预警设置</a></li>
             <li ><a href="WarningSetuptime.aspx">响应时间预警设置</a></li>
            <li class="active"><a href="javascript:void(0);">已启动的预警</a></li>
            <li><a href="WarningProcessStop.aspx">禁用的预警</a></li>
        </ul>
    </div>
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">药品预警查询</a></li>  <li ><a href="WarningTrade.aspx">交易预警查询</a></li>
        </ul>
    </div>
    <div id="tabcontent">
    
        <%--<table class="querylist">
            <tr>
                <th>
                    地区
                </th>
                <td>
                    &nbsp;<asp:DropDownList ID="ddlCity" runat="server">
                    </asp:DropDownList>
                </td>
                <th>
                    药品类别
                </th>
                <td>
                    <asp:DropDownList ID="ddlType" runat="server">
                    </asp:DropDownList>
                </td>
                <th>
                    药品名称
                </th>
                <td>
                    <asp:TextBox ID="txtDrugsName" runat="server" Enabled="true" Text="全部"></asp:TextBox>
                </td>
                <td>
                    <asp:HiddenField ID="hddGoodsId" runat="server" />
                </td>
                <td>
                    <input type="button" value="选择" onclick="window.open('DrugsNameSelect.aspx', 'DrugsNameSelect', 'width=600,height=400,resizable=0,scrollbars=0, status=0, toolbar=0, menubar=0')" />
                </td>
            </tr>
            <tr>
                <th>
                    响应类型
                </th>
                <td>
                    &nbsp;<asp:DropDownList ID="ddlWarningType" runat="server">
                        <asp:ListItem Value="0">企业已确认定单医院未入库</asp:ListItem>
                        <asp:ListItem Value="1">企业已开发票中心未审核</asp:ListItem>
                        <asp:ListItem Value="2">医院已提交退货单企业未确认</asp:ListItem>
                        <asp:ListItem Value="3">医院已提交回款单企业未确认</asp:ListItem>
                        <asp:ListItem Value="0">医院已入库未回款</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <th>
                    预警天数
                </th>
                <td>
                    &nbsp;<asp:TextBox ID="txtDays" runat="server"></asp:TextBox>
                </td>
                <th>
                    医院
                </th>
                <td>
                    <asp:TextBox ID="txtHospital" runat="server" Enabled="true" Text="全部"></asp:TextBox>
                </td>
                <td>
                    <asp:HiddenField ID="hddHospitalId" runat="server" />
                </td>
                <td>
                    <input type="button" value="选择" onclick="setValues()" />
                </td>
            </tr>
            <tr>
                <th>
                    预警级别
                </th>
                <td>
                    <asp:DropDownList ID="dropLevel" runat="server">
                        <asp:ListItem Text="一级预警" Value="0"></asp:ListItem>
                        <asp:ListItem Text="二级预警" Value="1"></asp:ListItem>
                        <asp:ListItem Text="三级预警" Value="2"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <th>
                    &nbsp;
                </th>
                <td>
                    <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
                </td>
                <th>
                    &nbsp;
                </th>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>--%>
         <asp:GridView ID="gvwDrugPreWarning" runat="server" 
            CssClass="mainlist" EmptyDataText="暂无符合要求的数据！" AutoGenerateColumns="False" 
            onrowdatabound="gvwDrugPreWarning_RowDataBound">
            <EmptyDataTemplate>
                <div><label style="color:Red">暂时没有你要的数据！</label></div>
            </EmptyDataTemplate>
             <Columns>
             <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                        <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                 <asp:BoundField HeaderText="地区" DataField="AreaName" />
                 <asp:BoundField HeaderText="医院" DataField="HospitalName" NullDisplayText="所有医院" />
                 <asp:BoundField HeaderText="药品类别" DataField="SortName" NullDisplayText="所有类别" />
                 <asp:BoundField HeaderText="药品名称" DataField="ProductName" NullDisplayText="所有药品"/>
                 <asp:BoundField HeaderText="预警数量" DataField="WarningCount" NullDisplayText="未设置数量" />
                 <asp:BoundField HeaderText="预警金额" DataField="WarningAmount" NullDisplayText="未设置金额" />
                 <asp:TemplateField HeaderText="预警级别">
                    <ItemTemplate>
                        <asp:Label ID="labLeve" runat="server" Text='<%#Eval("WarningLevel") %>'></asp:Label>
                    </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="预警天数">
                    <ItemTemplate>
                        <label id="lab"><%#Eval("WarningDate")%>天</label>
                    </ItemTemplate>
                 </asp:TemplateField>
                 <asp:BoundField HeaderText="制定时间" DataField="AddTime" />
                 <asp:TemplateField HeaderText="是否启用">
                    <ItemTemplate>
                        <label id="lab"><%#Eval("IsUsing").ToString()=="True"?"已启用":"未启用" %></label>
                    </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="选择">
                <HeaderTemplate>
                    <input id="chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this,'ctl00_ContentPlaceHolder1_gvwDrugPreWarning','chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="chkID" id="chkID" 
                        value='<%#Eval("DrugPreWarningID")%>' onclick="chkChecked(this,'ctl00_ContentPlaceHolder1_gvwDrugPreWarning','chkAll');" />
                </ItemTemplate>
            </asp:TemplateField>
             </Columns>
         </asp:GridView>
         <div class="page">
    <webdiyer:AspNetPager ID = "AspNetPager1" runat = "server" 
        onpagechanged="AspNetPager1_PageChanged"></webdiyer:AspNetPager>
        </div>
         <br />
    </div>
    <div class="listctrl">
        &nbsp;
         
        <asp:Button ID="btnForbidden" runat="server" Text="禁用预警" CssClass = "btn"
            onclick="btnForbidden_Click" />
         
    </div>
</asp:Content>

